Various changes brought in. Patch from Vincent Torri - thanks
This is static at the moment but could be made dynamic to allow code to hook in new views