more changes and cleanup