Expand and improve convert functionality