[BUGFIX] Moving template methods

Moving some template methods from header to source file.
Fix the redefinition error at using the library in other project.
Added deploy ruler to makefile.