Revert "Updated loki and various other fixes"

This reverts commit 4158b21a1d6e84609aec0446f527437588028b15.