Implemented dynamic window size and autoscroll

The parameters might need a little tweaking depending on the final
output size. Maybe it would be a good idea to write the number of nodes
to the database (as this is also interesting statistical information,
and it will be necessary to display the warning to the users.