Added mode selector, fixed ant script and updated readme file.