A few minor code changes