Fixing test and removing unwanted code