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