Refactored turing module