Fixed type and added a couple comments