Refactoring.

Removed functionality from public static void main() into to new functions.