Added Unittests for correct application and filtering of options fo the
database.
Fixed the usage of option values as columns.