minor changes and cleanup