Add functions convertDirection, convertAction and rename constants