Non-logical version for Ismagilov.
Few warning fixes
Few tries to fix