Update 17-03-2014

Code cleanup made code structure cleaner and more usable for extension