Removed unused imports and renamed duplicate function StaticNumLines.
General cleanup before convertig to a class