Fix some BiF issues.
Small fixes and simplifications.