Added comments and indentation
Works now, Need to check against scope
Added comments, indentation