Refactor check_line methods
Add more functionality