stacks: minor refactor for code reuse
stacks: minor refactor for code reuse

kwagdy/koding-1,gokmen/koding,cihangir/koding,acbodine/koding,usirin/koding,rjeczalik/koding,drewsetski/koding,alex-ionochkin/koding,sinan/koding,jack89129/koding,kwagdy/koding-1,drewsetski/koding,koding/koding,koding/koding,koding/koding,sinan/koding,andrewjcasal/koding,jack89129/koding,andrewjcasal/koding,rjeczalik/koding,usirin/koding,alex-ionochkin/koding,szkl/koding,sinan/koding,sinan/koding,drewsetski/koding,rjeczalik/koding,usirin/koding,usirin/koding,rjeczalik/koding,szkl/koding,kwagdy/koding-1,andrewjcasal/koding,andrewjcasal/koding,drewsetski/koding,gokmen/koding,szkl/koding,koding/koding,gokmen/koding,mertaytore/koding,rjeczalik/koding,acbodine/koding,alex-ionochkin/koding,koding/koding,mertaytore/koding,sinan/koding,rjeczalik/koding,gokmen/koding,cihangir/koding,sinan/koding,alex-ionochkin/koding,kwagdy/koding-1,szkl/koding,jack89129/koding,acbodine/koding,gokmen/koding,mertaytore/koding,cihangir/koding,szkl/koding,gokmen/koding,jack89129/koding,cihangir/koding,koding/koding,mertaytore/koding,jack89129/koding,andrewjcasal/koding,cihangir/koding,kwagdy/koding-1,szkl/koding,jack89129/koding,alex-ionochkin/koding,usirin/koding,drewsetski/koding,cihangir/koding,acbodine/koding,gokmen/koding,kwagdy/koding-1,acbodine/koding,mertaytore/koding,acbodine/koding,andrewjcasal/koding,koding/koding,usirin/koding,drewsetski/koding,drewsetski/koding,kwagdy/koding-1,andrewjcasal/koding,cihangir/koding,usirin/koding,alex-ionochkin/koding,gokmen/koding,andrewjcasal/koding,jack89129/koding,alex-ionochkin/koding,acbodine/koding,rjeczalik/koding,sinan/koding,usirin/koding,kwagdy/koding-1,mertaytore/koding,szkl/koding,cihangir/koding,acbodine/koding,koding/koding,mertaytore/koding,szkl/koding,alex-ionochkin/koding,sinan/koding,mertaytore/koding,jack89129/koding,drewsetski/koding,rjeczalik/koding