Rewrite module, added defaults for struct types