Cleaned up code
Added insight identity
Added authentication
Added comments