Remove a few unused variables, and sort a few "critical" bugs..