Simplify -g option
Add base for unit tests