finished implementing request handler

additionally: some refactoring etc...