Refactor coder creation