Added eventual function that searches a nested type for a particular base type; fixed probelms with empty list as a pattern; fixed beat and int issues arising from expressions of type beat being in a list of ints