Removing unneeded code and dependencies