Add type defaults and add some tests