Simplify code
Learning uses contrast definition based on bitmasks
Make relearning mode switchable from CLI
Change order of declarations and definitions
Move options types into Options namespace