Added commons-codec for hash stuff.
Several tweaks and fixes related to the database structure. Still in
progress, expect huge updates in the following commits.