Fixed and added a unit test to UnTinyUrl; minor style and logic edits