Added line count and leveling