Refactor html application command line arguments

Also added config properties
Add command line options for API application