add license url
add some badges to readme
extract options parsing to separate function
some cleanup