Added testing + refactoring to remove code smell (and dependency to lift)