Cleanup: fix line length and move definitions