Added Steven's SO question and answers that should be good to tackle