Refactored line draw method into vertical and horizontal methods