formatting and dead code deletion