removing several errors and variables