Implemented issue 18, fixed the filtering of types and fields by index and type