Added date header and changed code to fit better in 80 chars.