Fixing(?) templates + rudimentary logging