Refactored Khorsi module