Removing unsed code and fixing other code wasn't working.