Removed code redundancies