added more edit, and fixed some loggin stuff