Fixed some indenting problems, and added the refresh every half a second