[REFACTOR]: Amend count_lines and get_type to use.. well, whatever this is I'm doing here.