mass refactor and cleanup step 1
WIP - Wed Sep 17 22:02:37 CEST 2014