fixed references, cleaned up formattimg