Move template sqr function to header.

Move template sqr funtion to header, has to be like this.

Wanted to be to fancy when moving from the user directory