Fixed critical bugs & updated documentation