Changes here and there

Some changes from reading Sergio's Master thesis.