Experimental simulator for basicmlearn template, some cleanups and tweaking.