Added support for advanced compilation.
tweak docs re: advanced compilation, test with all compilation modes