Add analysis to targets + bug fixes