Added two new functions.

Added ajaxd for returning data and toggle for toggling elements.