nil argument handling
Clean up initialization and handle arrow keys in codebox