Refactor tests, support proper nested conversion