Fixed problem caused by jquery chaining
Moved buttons to buttom of TDs