refactored conversion functions, added a number of testing functions
fixed a bug related to the -c option