Fixed bug that was preventing queries from being formatted correctly (spaces weren't being replaced with '+'). Also fixed UI bug.