Fix default option implementation
Various code improvements