Refactored w,x,z orderings
Big change: removed n_batch as model field