WIP tests and cleanup