Removed some unnecessary code