The legislative authority shall extend to all matters of a legislative character not locally inapplicable, including power to create, consolidate, and reorganize the municipalities so far as may be necessary, and to provide and repeal laws and ordinances therefor; also the power to alter, amend, modify, or repeal any or all laws and ordinances of every character in force in Puerto Rico or municipality or district thereof on March 2, 1917, insofar as such alteration, amendment, modification, or repeal may be consistent with the provisions of this chapter.