Various code cleanup and new keyboard mappings.