allow use of a custom widget name and formatting fixes

add: formatting and commenting
add: use a main method to initialise the extension
add: allow use of a custom widget name
add: basic options and system argv parsing