<s>[INST] Here is a Python script. It works but I'd like to refactor it to have "separation of concern"  better. This script is responsible for checking if a given file has been modified since the last time it's been flagged.
```python
import os
import hashlib
import time
import pickle

def get_md5_checksum(file_path):
    hash_md5 = hashlib.md5()
    with open(file_path, "rb") as f:
        for chunk in iter(lambda: f.read(4096), b""):
            hash_md5.update(chunk)
    return hash_md5.hexdigest()

def get_datetime_from_file_name(file_name):
    parts = file_name.split('.')
    extension_position = len(parts) - 1
    last_timestamp = int(parts[extension_position - 1])
    return last_timestamp

def get_last_timestamp_from_file_name(file_name):
    return get_datetime_from_file_name(file_name)

def write_timestamp_file_md5(file_name):
    checksum = get_md5_checksum(file_name)
    timestamp = int(time.time())
    data = {
        'timestamp': timestamp,
        'md5_checksum': checksum
    }
    with open(file_name + '.timestamp', 'wb') as f:
        pickle.dump(data, f)
    return timestamp

def get_timestamp_from_timestamp_file(file_name):
    timestamp_file_name = file_name + '.timestamp'
    if os.path.exists(timestamp_file_name):
        with open(timestamp_file_name, 'rb') as f:
            return pickle.load(f)
        # return timestamp
    else:
        write_timestamp_file_md5(file_name)
        return get_timestamp_from_timestamp_file(file_name)

def is_file_modified(file_name):
    if '.last_executed.' in file_name:
        last_timestamp = get_datetime_from_file_name(file_name)
    else:
        timestamp_data = get_timestamp_from_timestamp_file(file_name)
        last_timestamp = timestamp_data['timestamp']
    real_timestamp = os.path.getmtime(file_name)
    if real_timestamp > last_timestamp:
        write_timestamp_file_md5(file_name)
        return True
    return False

def is_modified(file_name):
    return is_file_modified(file_name)

def main():
    is_modified(sys.argv[1])

if __name__ == "__main__":
    import sys
    main()
```
I believe it should be split into separate classes. What would be a good iterative way to start refactoring this code?[/INST]