Fix formatting, remove unused code