Various clean-ups and minor renames, added more documentation and license