Added everything up to the actual move-making logic