fmt & code cleanup