Deleted unnecessary functions and variables