Add a @requires decorator which is used to specify optional dependencies and
requirements.
Cleanup BS code.