Change license to GPL3
Complete rewrite
Unit tests!