Move ajax callbacks into own methods for easier viewing

Remove comment

Remove session clearing