Who did duties like janitorial work?
FWIW, in the US Navy, the people whose jobs consist mostly of janitorial work on a ship are called "undesignated strikers", which are people who have yet to attain ("strike") a rating (which I think is just "position" in Starfleet parlance). There's also undesignated firemen, who work in the engine department but are similarly undesignated and thus spend most of their time cleaning. But really, pretty much everyone who's not a commissioned officer does janitorial work—if you don't have anything else to do, you clean. Navy ships are generally clean as a whistle (
especially as compared to merchant ships) because of the fact that basically everyone is cleaning all the time. I'm not sure if the same thing is true for the Coast Guard, but I would suspect so. In the Merchant Marines, cleaning is mostly done by Wipers in the Engine department and Ordinary Seamen in the Deck department.
Were the bridge officers in charge of others? In other words, was Uhura in charge of teaching some lower ranks about communication, and did Spock lead a team of other science people, even though that training may not have been shown?
I don't think being at a bridge station would necessarily make you a department head. While Spock may have been the Sciences department head, most other stations seemed to be occupied by people whose job was to operate that station. For example, Uhura was in charge of operating the communications station (which would seem to be a combination of the Navy Radioman and Signalman ratings, with a dash of Sonar Technician thrown in). She probably wasn't in charge of every piece of communications equipment on the ship; so if the actual subspace antenna needed parts replacing or if some modification needed to be done to some handheld communicators, my guess is that would be handled by a machinist's mate (or whatever the equivalent in Starfleet is) from the Engine department. She probably did train lower-ranked communications officers, though, and she was apparently a line officer as she had the conn on at least one occasion. I also suspect that, like on a submarine, everyone is trained to be able to do everyone else's job, which is why you'd occasionally see her jump on helm or navigation.
I'd say the same probably goes for Sulu—he's probably not a department head, and probably is not in charge of all the steering equipment onboard. On the other hand, he seemed to double as a Weapons Officer, since weapon firing commands were sent through the helm station until the "tactical station" or whatever it was called was introduced in TMP. So who knows? Maybe he was in charge of the gunnery department. If so, then yeah he'd be a department head. My gut feeling is that he wasn't, though. And, apparently, he was also a line officer.