Removed redundant code/refactored