Refactor long lines of code