Cleanup and misc fixes

- Fix domain and bucket creation code path
- Move more utilities into util module
- Improve the log method
- Add a domain listing entry point