Additions to qb-py

I plan to continue adding code (and cleaning up typos here and there) over the next few days, so if I will need to create a new pull request for those changes you may want to wait a little bit (or not—up to you).