Improve dictionary factory & constant transformer