Fix type errors. Remove unused functions. Fix documentation
Add a better README file