reflow content based on size
begin of big changes to add mobile support and better viewing support