Program seems to work now, more debugging to follow