Cleanup changes and further tests