Minor cleanup.
Add specs
Prevent against atom throwing badarg.