Refactored level.js to a revealing module