Added header, code cleanups.