Change python scripting access, consider multiple instances, avoid gloabl variables
Refacture python access