Add missing template parameter checks, refactor things to put everything in swang.cpp, add README.rst.