Added maxLength. Added clip. Fixed custom type merging priority. Fixed custom type unit test.