added copyright and minor style changes