some cleanup and adding missing things