templates stuff and two more fixts