Added loading bar.
Style tidy.
Program style improvements.