Added GPLv3. Bugs fixed.

Almost finished.