Added code for handling a indexed view. This should be combined with the tail view portal to only read the necessary info in the end of a file when it is updated.