some refactoring
more cleanup ... it's a wrap for the night