Fixed several bugs
Documentation