Reorganize and cleanup tests