Formatting
Fixed comments + minor logic improvements