WIP: factor-out getargspec stuff