Bunch of fixes.

Fully implemented notes and cleaned up a bunch of stuff. This will break your current database! The database schema is far simpler now, though.