Bugfixes
Bugfixes. CMD args handling. Code cleanup