Changed from Stack to LinkedList
Changed frame handling