Update for API changes and moving of snapopen function