Added some formatting and basic error handling.  Want to add a little more before integration