Some minor code changes