The common setup script for the Mikrotik routers on my network now amounts to 1347 lines of code. I'm not sure if anyone has stretched the Mikrotik scripting language quite as far as I have. I'm basically writing JavaScript-style code in it, with heavy use of data structures. Among the things the script does, there is a deep merge function so I can set defaults but override specific settings for individual routers.