Fixes and cleanup.