Brush up
Add tests