Some support for getopts added

- Jut first part