Code refactoring + line borders for colored lines