done reformatting, remove unused code