Added maxLenght. Added getLast and getFirst.