refactoring

Signed-off-by: Sean Nicholls <seannicholls@gmail.com>