Random changes

Feel free to cherry-pick whatever you find useful.