CS fixes
Make better
Add tests