big refactorisation (with grunt)