Simplification of code