fixed the compile errors
got all of the current unit tests passing, no refactoring...
Getting badly qualified applications now produce nice errors
reformatted tests slightly
reformatted tests slightly v2