Coding style fixes

Please test this with your projects if it is not breaking anything for you. If not then I will merge it to master.