Som testing and a lot of smaller code fixes