Can someone help me to improve my code? IR remote control to control Motor

Very interesting, much appreciated, will note it and see how may it work for my project, but i feel what you mean.
thanks