Refactor and very basic lang support