Small implementations and fixes