Feature/separate error checking

This separates error checking from the whole main routine in case we _just_ want to do error checking.