added some additional indexes to try and speed this up further
minor formatting