Fix typedef. Add comments