Fix: JSHint tweaking
Fix: Fine-tuning the flags algorithm some more