Fixed unused variable error, updated documentation