Remove some useless code, extract an exception into its own class
Update generated docs