reformatting and code cleanup

@jar398. shorter lines