Fixed Button detach bug

and moved buttons to top left (as most standard programs have)