Interim commit.
Bug fix (had gone unnoticed because it was in a previously unused template).
Make a function NOT inline.
Moved many methods out of the class.
Interim commit.