Add HUnit testing and refactor to support it.

Main.hs is now a separate, very thin module.
Full tests for Objects. Fix attribute bugs!