some improvement to the code. Starting the "better modelling" phase.