remove whitespace
better error message
use interfaces rather than pointers to actual types.