use derequire to rename require uses in functional scope

fixes #10