Fixed formatting and added debugs