Make program more configurable

Raw commit (no compile) to save lot of changes