More formatting fixes, added more error codes