Refactored MyLinkedList so it inserts to both front and end in constant time