Moving decorator and hooks into file on their own to be able to import what one needs

Yet another step for Issue #4. I'll consider it done once I've refactored the unittests
to have both the decorator and the hook tested and once I've updated the documentation.