IIFE format, clean up lint errors and Unit Tests