Done for the evening - mostly works, needs tweeks