Added better error handling, updated runtime estimation.