Lazy initialization + refactoring
Add switch test