#663 code cleanup.
#663 Ading test cases.
Merge branch 'master' of github.com:europeana/portal