Fixed accounts stuff to hook up to template