Separate Error line skiping from function identification. Clean up code