Simplify code structure by blocks