* Improve handling inverted condition * Fix tests * Rename variables for clarity * Add initial test * Add another test * Format * Fix FP