Improved choice of free slot and some minor fixes

-Modified GetFreeIndex() : now it finds new slot only when it's needed;
-Fixes some minor logic bug : CheckPosition() and GetFreeIndex();
-Added lvalue array subscript;