License and copyright update, gitignore to include pyc, file encoding in .py files.

Changes as detailed in title. There also appears to be whitespace that was cleaned up which wasn't mentioned.