Some simplification of code.