Your first question is partially correctly answered. The only issue is that you should consider note values as relations to the reference meter, not only the beat.
For instance, while technically a quaver is a quarter of a beat (in an x/4
meter where x is between 1 and 4), you also have to remember that there are meters that have different layouts; for instance, the compound meter of 6/4 considers 2 subdivisions of 3 "sub-beats", but it's also commonly considered as a 2-beats based meter (similarly to 6/8). So, one could say that a semiquaver, in that case, is not a quarter of a beat, but a 12th.
A very important thing to remember in rhythmic notation (and music in general) is that it's all relative.
Regarding your second question, these are some rules to keep in mind:
- beams are always grouped based on their "siblings" (notes that have the same duration): in your last image, that further line makes no sense, since it's preceeded by a note that has a similar duration;
- beams usually extend only within the beat or subdivision, not over;
- notes that share a common parent duration also share the beam related to the biggest duration;
Considering the above, this is not completely unusual, and it has the benefit of clearly showing the quaver grouping within the beat:
- "broken" beams exist only for notes that have no "siblings" (both preceding or following notes that have a different duration);
- "broken" beams are always towards their closest "parent" beamed note: a demisemiquaver between a quaver and a semiquaver is always beamed towards the semiquaver; if, for musical reasons, you need to group them differently, the parent beam is separated;
- in special situations for which the parent beamed notes are the same (consider a semiquaver between two quavers in a 5/16 meter), the direction is based on the beat, subdivision or musical requirement (phrasing); considering the 5/16 case above, the direction depends on the subdivision: if it's a 2+3 meter, then the beam is on the right, otherwise, and in the rare situation for which there's no actual sub-beat, it's on the left;[1]
Finally, consider that what you're asking is about very rare and specific situations. Your first image and the first example related to the second questions are generally considered as bad notation practice.
Remember that the first rule of notation is to ensure the score can be read as much easily as it's possible: the performer should focus on making music, not decypher how it's written. Beams (and groups) should always help the musicians, not distract them.[2]
In both cases, you have notes grouped along more than one beat (or grouped subdivision), which makes them really awkward.
Here are better versions of them:
While they might seem more complex than your examples, they're actually much more readable and understandable, since the hierarchy of beats and durations is much more clear: the musician can clearly see where (and when) one beat ends and the other starts.
[1] I've seen very special situations for double-sided broken beams, but that's generally a very odd case for very odd notations that cannot be considered as standard.
[2] obviously, the first real rule is music theory, so you could get properly written sheet music that's still hard to read for some reason (consider cases with lots of double sharps or flats), but, as with any rule, there are exceptions; for instance, sheet music for harp sometimes ignores harmonic rules, as the technical "limitations" of the instrument suggest that it's better to write an enharmonic note that properly indicates the string to play instead of the harmonically correct note; for percussion instruments, you can get "pointless" durations (you'll get the same sound and sustain from a snare drum hit, no matter if you write a crotchet, a quaver or a demisemiquaver), but specifying them is actually nonsensical most of the times.