Refactoring and bugfixes.
Merge branch 'develop' of github.com:amooma/GS5 into develop