more cleanup and passing things as the type they are...