getSafeMove implemented, removed some other functions