Cleaned code, added expedtedFailure in test