Added comments, minor styling