Refactor requirements. Fixes #4