Various refactoring/improvements, added index file parsing / matching