Removed a bunch of unnecessary code.