Common code in attributes modules extracted