2. Whether you can apply for a patent depends on whether the specific technical problems were solved during the initial development. If so, yes. Such as the original software algorithm. If you design a new simple algorithm, its function is equal to or better than before, you can apply for an invention patent.