Bugs fixed. Camparator was not tested yet.