Cleaned up Rmax debug