Miscellaneous code with annotations.