Refactor to alchemy module