Extract constants
Add tests