Added comments, fixed style