Changed Tape represantation. Added Tests