Cleaned up/created functions need to actually write to file