got rid of some useless code, fixed up formatting