cassy: move helpers to end of file