fix code issues + autoformat