some cleanup, add root_dir parameter

Signed-off-by: the-architect <marcel.scherf@epicteams.com>