removed some obsolete template code, todo comments