Some cleanups and newton