Some refactoring, better log output, and some missing semi-colons
Wording