move all js to footer, combine ajax controllers into 1 controller