some refactoring in SPL front-end