Updated to remove afb dependency