Finished implementation of IoC