heavy refactoring + resource management ; complete functional workflow for resource construction