Removed some unnecessary code and some comments.