Fixed lots of bugs...