Hamas replacing defunct Gaza courts