Move template inline functions inline
cleanup