Added two smaller-scope methods to main.js