Fixed requires

Signed-off-by: Gus King <gusssk@gmail.com>
refactored further

Signed-off-by: Gus King <gusssk@gmail.com>
Merge pull request #1 from zbunde/testing

refactored further in a testing branch