Refactorings

Signed-off-by: Eric Malm <emalm@pivotallabs.com>