// Condensed LinkedList template implementation as it was not working separately.