All fireplaces and chimneys in stone or brick walls in any building erected after February 20 1917 and any chimneys or flues altered or repaired after said date shall have the joints struck smooth on the inside, and the firebacks of all fireplaces erected after said date shall be not less than eight inches in thickness of solid masonry, the chimney walls to be not less than four inches thick and the top of the chimney to extend not less than five feet above the roof for flat roofs and two feet above the ridge of any pitched roof. No woodwork or timber shall be placed under any fireplace or under the brickwork of any chimney. All floor beams, joists and headers shall be kept at least two inches clear of any wall enclosing a fire flue or chimney breast.