refs #40 moved javascript elements into base.html so it can be cached