Improved greeting, added profile->username method

* Fleshed out helper methods (especially types)
* Added a method to strip superpage and namespace from profile names
* Improved greeting
* Simplified body of script
Cleaned up comments, grouped functions

Improved documentation and made clearer.
Done with this proof-of-concept (non-Flow, leaves messages on all pages in
learner category).