formattting, removed old comments, error logs added