Added static function to read commands.
ref #4