Clean up and documentation of tpl subpackage.