Removed some code redundance