Minor changes
Rewrite tests