Cleaned up case statements