Fixed oodles of bugs.