Improved capital detection
Fix some logic

Woops