Sunday code sesh, couple of .js problems