Refactored m and moffs.