Fixed some errors. Writed tests.