more cleanup and source header added.