Reworked JS to use resourced framework