refactor to use JSON, properly format manifest, get memory from cf.

Signed-off-by: Jesse Alford <jalford@pivotallabs.com>