My js13k entry for 2014 edition