public Menu getMenu() throws NoPagesException, InvalidMenuException{
		if(style == null){
			throw new InvalidMenuException("No style set");
		}
		if(pages.size() <= 0){
			throw new NoPagesException();
		}
		Menu menu = new Menu();
		menu.setStyle(style);
		for(Page page : pages){
			try{
				menu.addPage(page);
			}catch(PageAlreadyExistsException e){
				throw new InvalidMenuException("Duplicate pages in menu");
			}
		}
		menu.updatePages();
		menu.setTitle(title);
		menu.setColor(mainColor, titleColor, pageColor);
		menu.setPrefix(prefix);
		menu.setUsePrefix(usePrefix);
		return menu;
	}