Refactoring without eventmachine