renamed private methods so that we can flexmock them, renamed them to follow python naming conventions, and updated code to create XG path