Would remote on line remote software development work be legal work

I have 2 questions:

1- I am a software professional in US and planning to move to Thailand on a retirement Visa next year. I am planning to work as a freelancer to customers in Europe and US using Elance, Freelancer etc to get work and get paid. All payments will be deposited into my US based bank account. I was wondering if I would be required to get a Work authorization for this kind of work. 

2- I did not see anything similar to software development in the restricted job categories list. So would I be better off coming as a Visitor and keep extending every 90 days. I see that there is some kind of 90 day reporting to immigration required anyway. How about starting an business in this field, I am familiar with 49%,51%  and shareholder type company with 1MB.   

Thanks

FYI ~ If you utilize any IP service, in Thailand, for generating income (even for off-shore clientele), then yes, you're required to have a Work Permit. 

Registering a Thai corporation will provide that Work Permit, together with a Thai Tax ID number.

Enjoy your retirement. :cheers:

Thanks Jana..

New topic