urlencoding & better validation of emty values