Refactor the BBC library