Refactored the config parsing methods to reuse code.
Added a method for parsing unsigned integers.