Latest changes and a boatload of one off functions.