Remove unnecessary code in static block