Remove some prints and clean up code