Added FMIndex class, and made minor bugfixes