fixed a ton of bugs
Merge pull request #10 from dcs24/master

Bug fixes