Major overhaul, removed a ton of unused stuff.