#4 : Refactor catalog code (WIP)