Default parameters for functions, with some tests
Refactor treating of fields