Remove depricate code, fix function