Fixed warnings, updated documentation