Vso quantity

Fix for the quantities for VSO, HEK and database.

@kaichogami, this as it is does not work for py2.6, but it's possible that we won't support it anymore.  I will try tomorrow to update it to make it work. However, before merging this I would suggest you to merge with master from upstream.