Code formatting and some comments