Lots of cleanup, updated db optimisation, monitor etc.