New recordtype test; refactor views; code tidy up.  Very work in progress