Implement MODE parsing