Add tail recursion detection and stats for val vs var vs lazy val
merge changes