Setup document window GUI layout and added function documentation.