Made some changes to make code consistent with README