Removed lots of dumb code