Changes to reduce type coversion to aid performance