Refactoring

ApiKey: renaming to NMAKey
Notification: improving bad input handling
NMAKey: improving bad input handling