Removed unused switch check.
Moved main() to separate source file.

Eases inclusion of decdds.c in other projects.