Code restructuration (prepare for GLUE2 support)