Remove unused imports, cleanup comments
Refactor to use Node class and sort in O(n) time