Move sample code to a separate file, use numeric indexing for shape types