Added preventDefault to button click handlers.