You may want to use the building tool (https://wiki.openstreetmap.org/wiki/JOSM/Plugins/BuildingsTools) for houses or alternatively press "Q" to orthagonalise the ways as most of the buildings are comprised of right angles