Refaktor app in nodewebkit