misc changes and cleanup