Fixes a couple of issues by using interfaces rather than a specific implementation

Hi,
after taking a look at http://nemo.sonarqube.org/dashboard/index/48569 for some low-hanging fruit, I fixed some various instances where interfaces could be used instead of specific implementations.