[TW102] - Core/Scripts - Base work for ToC5

All this needs is the SQL (and a complete rehaul of code style...)