Changed leftpressed and rightpressed to one single flag. Now only checks if something is pressed.
Bugfix: pressed has to be called as static field.