Complexes resolved and code cleaned up