Refactored code and removed redundant entries