Added URL Encoding for form posting

Changed the structure a bit