Refactor Ennui module