shorten long names, added error codes