Initial set of tests and minor refactoring

Can you please add "and not self.slug" so we don't overwrite the slug if we specify a custom one? I noticed that before but never got around to changing it :)