Reorder and restructure tests to ensure they pass