remove unused macros
change log level from debug to info
add option parsing functionality