#21 Reorganized code to use revealing module pattern