removed all unused variables and null references to scripts. everything is broken