WIP. Started writing tests.