Refactored Code / File deletion

Signed-off-by: Osoldier