Install motog stock framework
The XDA post you referenced tells you how to do what you are asking (taken from the XDA post):

How to flash:


Download ROM to Internal SD.
Boot into Custom Recovery.
Factory Reset (System, Data, Cache, Dalvik)*
Flash ROM with TWRP and reboot.


*NB: It is often also necessary to Wipe > Format /data > Yes (Warning: This will erase internal storage) - Do this before reporting any bugs.