Cleanup, shorten and document the onClick event handler