Saw the dysfunction and patched it up enough to be able to sleep tonight.
I’ve got a couple of hobby sites that have lived on ‘patches’ for years.
You’re right, the code does need to be written from scratch and I probably will tackle that when time allows. This was a stop-gap measure as I deleted my site accidentally this week and needed to slop something together quickly.
That’s more normal than you may think.
One thing that helps out is a ‘base code.’ I’ve created a base site code (HTML, CSS and EE tags) with appropriate wrappers, regions, columns, etc., that I use when I need to throw together a site quickly, rather than muck through someone else’s code (which may be better, but takes longer to figure out). A whole EE site can go up with basic header, logo, footer, main content area, left and right columns, footer, etc., in just a couple of hours using changes in CSS.