Regarding bringing the old house up to code, this could get complex. If an existing wall suddenly acts as the boundary/parapet, you could need a fair bit of work done to make it compliant.
Then your HWS would need minimum clearance. Meterbox location could be an issue. Eaves on existing home...