Improved formatting and added errors.h