Version checking and better errors, some fixes too