resolved http-listeners, added some DRY, inheritance and refactoring