Updated '/' removal function to modern python may not work on CHTC
updated args to ensure correctness
rationalised the file structure