Added spaces,line spacing and fixed implementation