Fixed TypeError and added documentation
15 files changed