Created main runnable. Refactored existing code.