Added and fixed more debugging