Adjusted some formatting and added comments