Revert "last commit doesn't play well with ajaxify, need a rethink."

This reverts commit f85678e9387a8038fe684f07213126f713f686ee.