Added tpl/2 and fixed some stuff in core

All these commits are due to my inability to use git (and to the fact i didn't find .gitmodules in my fork)