Refactoring towards a twelve factor app