Cleaned up. Plus, now using filtering via array instead of if for temp