Implementing fits writer, not working yet.