fixed returning promises in then, better templates