Code cleanup and license header updated
Copyright header updated