* Major code refactoring