Major code cleanup, refactoring and file / folder organizing.