changed usage(), added comments for readability, changed error messages in read_input(), various other small fixes