Finished of main interface 4

may need some improvments later

alot of code cleanup