Fixed a couple of bugs and added formatting the the Invalid Input string