remove redundant spaces, clean code