Added more utility functions; did some other boring stuff.