Added some typecheck for API functions
Added optional identation for saving models
Added typecheck and a function to create Relation from json
Added a print function for relations
Cleared library.py