Clean up encoder