Removed a bunch of unused code.