Removes some cruft and various warnings caused by redundant unsafe declarations, un-unwrapped results and similar tidbits.