Remove un-used code, get unit tests passed.