Rework logic and float/double conversion