Merge develop into master: Finish rewriting the library

The library has been rewritten and is working. See HabitRPG for an implementation.

It is much easier and cleaner to use.