clean up compile errors and warnings (still won't link)