Removed unnecessary functions
Removed unused type
Improved variable name