COFFEE: Refactor split code
COFFEE: Major code refactoring