Tweak PathState methods to correct return error codes; whitespace cleanups.