Refactor and Korma initial commit