json and better templates