Immigration law is enormously complicated and I can in no way claim to be an expert. Nevertheless, a glance through the primary documents is always helpful.
Link to Trump EO:
http://www.cnn.com/2017/01/28/politics/text-of-trump-executive-order-nation-ban-refugees/ Link to 8 USC 1187:
https://www.law.cornell.edu/uscode/text/8/1187 Link to 8 USC 1182:
https://www.law.cornell.edu/uscode/text/8/1182 Visa Waiver Program Improvement and Terror Travel Act of 2015.
https://www.congress.gov/bill/114th-congress/house-bill/158/text