some more cleanup and partially addressed #74