Further tidying of production mode i.e. Iinking errors in code