Fixed some bugs, both demos appear to work now