Started reworking tests with blueprints in place...

Also fixed a few coding issues around the code base. Not touched tests yet.