Reduce some parts of the code