HTTP API, command line tool and refactored code