Refactored equals method

Reduced in hopes of reducing cyclomatic complexity

@jgillham @gitAlexM @Asmohr