Removed redundant functions and variables.