Re-organized code, added helper.js - a combination of reusable functions.