Refactoring
Fix displacement
Fix another displacement
Extract isConditionMet()
Change parity calculation implementation