cleanup Api class some more