Usecase factory added. Refactoring performed