Re-built LinkedList class to use generics and function a little more generically(hehe).