Complete rework for Nette 2.2
Added tests