fixed failing tests. added skeleton for tn api stuff