More refactoring, and allowing notes and cassette name in API