clean up and small fixes