added error codes and fixed documentation
finished implementing vector