magic ajax done. Next: rework the rest of the module to reflect the changes in functionality.