Added all errors and more updates

Finished adding all the error code and added enough api methods for
basic functionality. We will see.