Basic main function