Following helpful advice from Zomgondo on reddit

http://www.reddit.com/r/javascript/comments/1j9gev/requesting_suggestions_to_improve_a_very_small_js/cbchmwf