Cleaned up logic redundancy