converting imperative code to expand the projects into build types to use totallylazy and a more functional style