Refactoring to fit new fluent api