Moved out the init config code to the super class to make it more
generic.
Added more bug fixes for cross platform support.