Revert "Fixe ajax'd building actions and remove some legacy JS"

This reverts commit 320d421a15cba654e28c387ceeb0b8fa6ca68461.