Performed cleanups, added a few methods, etc.