Adjusting loading bar
Change in order of module loading

Also further modularizing funcitons