puts z-indexes in variables and fixes #254 and #226
Merge pull request #260 from waltzio/z-index

Adds fixes for z-index