Parsing input

removing multiple spaces
detecting &