Did code cleaning.
Fixed bugs.