Revert "Updated loki and various other fixes"

This reverts commit dcde59850ecf563097374ee1fed9bf3779e7cb04.