Added some modules for indexing and stacking layers