Changed save function and added (incomplete) tile function.