Refactor read-config and remove unneeded code.

Comment out the tests for now.