Restructure code w/ passing lint

Signed-off-by: Evan Senter <evansenter@gmail.com>
rebasing changes from evansenter