Partial fix for 5.2 and removed \r
Cleaned up source tree a bit and fixed 5.3