Useful little tidbits of code