Made net compliant with dict semantics and added function comments
Fixed locals bug (now they are persisent across calls)