Remove unneeded code and code that breaks production mode.