Removed some of unnecessary code.