Clean up some formatting and remove unneeded code