Bug-fix:

 - Need to break early while checking for duplicates, otherwise
   resulting in false positives.
 - Removed a few unused typedefs, thanks to gcc-4.8.1