Converted library to use module pattern.