final changes and cleanup