Reworking code base for Gustavo