Fixing the ptr in the constructor and testing the function setupAstro