make controllers respond to js also, and factor out location