Moved some initialisation code from App to init.