Add support for --username, --password and --host. Refactor to make it more oo