More comments and minor refactor to my cpu implementation