one-of and all-or-none now works + random refactoring/restructuring