Convert array keys to underscore, add annotation for functions