Does it require a permit in MA to replace a sink & toilet? Window/Door trim? Baseboard?

We recently had work done on the house for which permits were gotten and completed (roof / windows / guttters / doors / siding).
We also had work done inside that didn’t require permits (floors, kitchen cabinets, granite counters).
But there were other things which we’re wondering if permits should have been gotten…
1) Replaced sink/toilet in a bathroom (husband did sink, gen’l contractor did toilet).
2) The new windows/doors required new trim inside (our cabinet maker did this). I liked it better than the old, so had him replace all the window/door trim and baseboards in those 3 rooms. A friend said this should have had a permit! (That seems hard to believe).
3) Sink replaced when granite counters put in
4) Changed from hot-water baseboard heat to hydro-air system with original boiler and new AC / heat-pump duct work (done by a heating / AC company).

We’re concerned because occupancy permit issues turned up (from 25 years before we bought the house) which we are now having resolved. We’re having all the inspections which should have been done 25 years ago, and I’m wondering if we’ll have troubles from this recent work that may or may not have req’d permits.

All our contracts for work done included that they were responsible for all needed permits.
I did contact the general contractor who said everything should be fine, those are minor things, they dont care.
Should I contact the heating company? He must have changed SOME plumbing, since hot water now goes to the attic when it didn’t before.
I’m probably paranoid, but don’t want problems with the building inspector.

Original owners of house never had inspections to complete building permit, now we are in violation …?

We bought a 25 year old house in May in MA. We had a general contractor do some work (roof, windows, siding, floors, kitchen cabinets). He got 2 permits for that work which he says are "closed".
In the process of converting our mortgage, the building dept just realized the original owners never completed all their inspections on their building permit (1985), and there is no occupancy permit for this house. They did do some (foundation / insulation / frame / plumbing).

Bldg dept found documents "in the back of the file". These show the original owners had gotten 3 letters telling them they were in violation of MA state law (1988, 90, 91). The dept must have forgotten about it, since with no occupancy permit our contractor shouldn’t have been able to get permits.

Since they say we are now in violation of MA state law, I paid the fee and we’ll get all the inspections.

Now I’m worried there will be costly code violations!
The general contractor (and others) have noticed things that were done ‘differently’. It looks like the owners might have really done alot of the work themselves. Knowing someone that had been an electrician, he’s pointed out some things that wouldn’t pass 85 code.

For example wiring in the basement goes across beams not along them. Also the general said the deck is too high and code will require a railing. These were all from the original owners (previous owners only here 3 years, and all they did was install a sump pump and french drains).
These things dont seem DANGEROUS so I dont want to pay to fix them. But I’m afraid they’ll find these and other things and it will be costly to fix everything. We already went way over our budget for repairs! The inspector we hired didn’t notice the plywood under all the sideing was rotted (due to original incorrect installation of tyvek / siding / gutters).

So legally, am I responsible for anything they find that hadn’t been done to code? I don’t understand why the building dept is acting irritated with me – I didn’t do anything, and I’m trying to now resolve the problem. It seems like it was their errors that got me into this mess.

In case things get expensive, is there any way the original owners are responsible for this? Or are we just stuck paying to fix anything they did wrong?

NOTE 1: Before anyone says "it’s your responsibility to ensure a house has an occupancy permit". How would we have done this? The bldg dept WAS asked if there were open permits and they said no.

NOTE 2: We did hire someone to inspect the property prior to purchase. They found many things, but not all. We realized there was a lot of damage to be repaired. We didn’t know the wiring wasn’t done to code or the deck was too high.

NOTE 3: There are no problems YET, but I want to be somewhat prepared and know what to do. This has already caused me to lost my mortgage rate lock, and delay our mortgage conversion. I’ll need to resolve this quickly to get the mortgage settled.

I realize there is risk when you buy a house. I thought we’d already paid for that with the new siding and fixing tons of rot.
But when other people actually violated the law, do we need to pay for that too?

Thanks for any information
We did do the inspection.

Legally the house required an occupancy permit for 25 years. The bldg dept was aware of this (from notices) but ignored it.
They were asked for open permits and incorrectly stated there were none.
Now I must legally do what original owner had to.
The question WAS asked (open permits) and bldg inspection office missed the info "in back of file".
Who else would we ask?
It is in writing (the "no open permits") only in the bank-assessors report. I could ask if they got it in writing, but I doubt it. Most likely a phone call.

And really – who do you know who has ever asked to get in writing "no open permits" prior to the purchase of a home.
Nothing was done "on the cheap". We’ve put 95k into the house already. We didn’t try to save money with a cheap inspection prior to purchase. The house was in need of repairs and wanted to TRY to know what we were getting into. Fully accepted responsibility for the missed rot, etc. An inspector is bound to miss something – and this required ripping off siding to discover.

But being responsible for others having broken the law, seems unfair.
We have every intention of obeying the law (unlike original owners who were state police officers).
Any violations will be fixed – I just fear the price of these. Our budget is already way over.

How do you prevent plumbing clogs while saving energy and water?

I am trying to do my part to save water and energy by using cold water whenever I can for laundry, washing dishes and hands, etc. I also try to prevent wasting water by not letting the sink and bathtub run, and have installed a tankless water heater for near instant hot water. The problem is that my plumbing frequently backs up due to buildup of soap/shampoo/laundry detergent/dishwashing detergent. I’ve read that flushing the plumbing once a month with large volumes of hot water will help prevent/treat this problem, but that goes against my principles of trying to save energy and water. Does anyone have good ideas for preventing plumbing clogs from soap/detergent buildup, without wasting a lot of energy or water?