start refactoring for new waterline standalone