Tests added, junk code cleaned