Refactored into a more sensible namespace structure