Several fixed bugs
Create unit tests suite