* Code cleanup and reorganization