Improve code for testing. Add breakpoints. Use ENV to check test.