Added hardMatch and tests. Also refactoring sneaks in