feature-conditionals

Some JS optimizations and conditional toggle implementation.