Clean up scripts, remove unused variables