Cleaned up path code.