Clean up access to class instance xpath value
Refactor some basic stuff, start of larger refactor