Make preferences work without custom frame

Basically removed all previously created ui and still keep the preferences code, so far only one brackets window can be open at the same time but it is possible to rework this in the future