Half-fixed issues left over from refactor so this can be merged into
audiofeedback branch.