Adding some module functions, so it can run headless online.