Change directory structure and add Either type