Complete version 0.9

Some bugs