Fixed API documentation

- also fixed selftest, which waited for port number from BIND