Start cleaning up gleam and adding tests.