Major code refactoring and code cleanups. New theme implementation.