major rebrush, fixing a lot of bugs.