#45: fixes bugs; adds a lot of FIXMEs and TODO
#45: updates documentation