Finished work on loading logic