Refactor embedded support