Minor changes
Major rewrite to provide REML and ML.  Still WIP, many pieces missing.