Simple web client and more refactoring