Changed some value types to reduce conversions