Add function for searching subjects.
Add helper functions.

repair incorect indexes...
Change name of methods, add closing dialog when error occur.
Create new structure PredmetRegistra, remove unnecessarily conditions.
Implement register predmetov ui.
Add keys and beautify code.