fix EF errors
labels tests and bugfixes
label test commit
implementation of labels and api cleanup code
forgot to include these files.
Merge pull request #26 from mejas/master

labels implementation