Refactor sample analysis code
Change charon updating from filesystem code to avoid deleting projects