Case insensitive search + lots of fixes + more tests