Small refactorings
Merge branch 'master' of https://github.com/stonemonkey/AutoMate.git