Useful bits and pieces of Javascript