Update of prepareSGP to pass CRAN checks and SGPstateData