Completed refactor, everything still seems to workgit diff

Change-Id: I1337afce07fd74830403227372144b7974325585