Some major refactoring.
Merge branch 'master' of https://www.github.com/Radirius/MERCury