Arrange your buildings in columns or rows, and put all buildings with the same width together. For example, all the buildings having (3x3) area should be in the same column or row. Also, every building needs to be connected by a road to the Town Hall in order to function.