Some fixes, more ast work, added 'find prime candidate for refactor' tool