Implemented searchFreeSlots. limited testing, requires more knowledge of
parser commands.