Clean up some formatting and directory creation