Moved event handlers to use knockout callbacks