Added method removeSpaceBefore