Added possibility to restrict current as Samsung does. Some changes.