Moved from batch and shell scripts to pure python