moved js out of html, implemented loading to and from preferences and scheduling themes, basic functionality works