Fixed non-conformance with name gaurds.
Key down and key up functions added.