Add some comments, format code