Updated files for implementation with format lib and improved commenting.