Small cleanup and fixes