Code review changes

Hi!

I've done some code review of your bundle. There is some results, maybe you will be interested in accept some changes.