Fix some types & add somes comments