Added changes to main to enable manual loading