Added field data type inspection and typed output.

Re-factored Program.cs into smaller parts.