Remove redundant code, dependencies