Added main
added cfg settings