Changing some stuff to dispatch a little the code into files