Moved some functions from Rectangle to GameNode directly.
Updated some logic of the pong example.