fixed bugs in GUI and added master page

...
added master page