Refining the JS API. Adding functionality for default theme