Removed unnecessary blocks of code