Removed unused functions and comments