Miscellaneous tidbits of code