Fix ajax timing issue by inlining template

Still has 2 failing spec =(