clean up variant parsing