Almost everything works but the last two tests. Major changes about to follow