Removed some unnecessarily code