A rework of the 2013 system with cleaner code.