A tiny bit better error handling (still needs a lot of work). Now handles a4,a5,b5,letter, legal.