Improve formatting based on number (decimal or not)