More efficiency improvemets, removed an instanceof check and trim() from
each object creation