Removed some unneeded code. Made small other changes.