Added comments, formatting