Refactor + Removed redundant code