Got rid of uncessary code