some additional changes and cleaning up