Removed unused functions and variables