Added unit tests for removal of spaces