Removed unused methods and cleanup a bit