Removed unnecessary functions and variables