All major functionality now present. Much clean-up still to do.