Update comments and code to be more intuitive