Refactored stacks repository

Signed-off-by: Damien Le Berrigaud <damien@pivotallabs.com>