Formatting and removed dead code