Battle against memory leaks + Bonus
* This commit should solve 80% of the leaks detected.
* Minor fix on the shouldAutoRotate method.