Fixing broken code and updating docs