Add configuration switches
Fix dialyzer warnings