Node.js compatability changes
Initial export/import implementation for easily saving/loading state