Added constructor and module pattern.