Handle invalid base errors; Remove commented code