Construction of prefabricated buildings