Just a few optimizations

Hi!
O just did a few optimizations over your syntax to achieve a more clean and maintainable code. I suggest you to read my commits title in order to follow and understand my changes.

Hope it helps.