Fix admin Task module
Remove unused code and clean up

- Add utility to get current hostname
- Remove hardcodeded localhost:8000 from payment adapter