Misc commits

Just four quick commits I made because I needed a tool like this today :) Thanks for sharing the code.