Added main application code