Fixes some API inconsistencies, adds support for 64bit architectures and fixes packaging (license terms, metadata etc.).