Moved implementation of templates classes outside of class declaration