Moved to module pattern for JS