analytics queries working, everything almost done