Remove redundant array keys, and ensure loading spinner isn't duplicated