Normalize models

Also moved to postgresql and rspec instead of test::unit, and made some UI changes.

Specs pass, but not everything is covered.