Ianoc/refactor macros

Moves the macro's into one target, don't think we need a common separate target yet.

Attempt to remove duplicated code. Rename test classes to be more obvious what they are (too much use of A, B , both types for a func and concrete classes)
when I tried to call these macros, it says it could not use a default argument in the repl. Does this work for you in the REPL `caseClassToMap[A]()`?