Memory fixes

Hi Daan,

Just to let you know I fixed some memory issues regarding the addon and added some methods to comunicate via javascript from local files in case you want to use them. Are you planing to develop further this addon?

Bes,

P.