Section 4. The department shall undertake such work for the improvement, development, maintenance and protection of Boston harbor as it deems reasonable and proper. It may, with the approval of the governor and council, grade and suitably surface any railroad locations or traffic ways which are or may be located on lands, flats or rights therein, owned or acquired by the commonwealth in Boston harbor, and may carry said ways or railroads over or under any railroad or railway location or public way in order to eliminate crossings at grade, and may provide suitable and convenient track connections between the rails serving any pier or piers and those of any existing or proposed railroad that now reaches or hereafter may reach Boston. All piers controlled by the department shall be accessible and open to all teaming and lighterage traffic, subject to such regulations as the department may from time to time make. Upon application to the department, any railroad company that now reaches or hereafter may reach Boston, either by its own rails or under trackage or traffic contract or agreement with any other railroad company, shall be provided by the department with a track connection with the tracks serving such pier or piers.