Function for printing an error and quitting.
Added error handling to add_year.
TYped register name.
2 is stderr not 3.
Fixed bad branch logic.
Reformatting.