update documentation and encapsulate modules in IIFE;