Made some little mistakes, and module should be wrapped in IIFE