Removing redundant/duplicate code