Refactor fib