Refactored for new languages