removing white space and console msgs