Added tests and merged save method to __init__