More small fixes to implemenetation