Improvements on Documentation, headers, and pathological cases

Concerns mostly osr