Refactoring.
Updated test methods for guard.