Pure refactor

Signed-off-by: Ellie Schneiders <ems2141@gmail.com>