Added comonadic interface
Split source over several files