Changed to module pattern