Refactoring the QuNeo scripts