20141018 Some improvements.

I`ve added few checking algorithms.