fixed lots of things requiring fixing
Merge pull request #44 from swglad/fix_things

fixed lots of things requiring fixing