fixes variable names, cleans up template