Refacto and add line support