Complex Task Learning from Unstructured Demonstrations