Tidied code a bit, minor refactoring in Preamble.
A bit of argument error handling for "snapshot" command.
Improved the trait definition and usage of AgentOrPortID.
Typo correction.
Fixed a bug in which a linked port with a setting mistakenly appearred
twice.
Tidied a bit of pattern matching code.