Lots of code removal, hopefully it's not completely broken now