Fixed lots of little bugs.
TODOs