Disabling buttons and clearing the code