Added the correct sorts to the index
Fixed bugs to get to working(-ish) version