Added KeyListener and general cleanup and standardization