modified redirect to use class name as controller, not request
removed duplicate code
some more code reuse
added check if the operation actually worked