Fixing minor bugs, adding unit tests.
Merge branch 'Devline1' of https://github.com/Datenheld/Bulldog into Devline1