few minor changes and cleanup