Add tests for types and fpt, small other modifications