Final version

All bugs gone.