Added generic base conversion.