After refactoring the code, everything is cleaner