restructuring and cleanup
Merge origin/master