lots of changes, start of graphical interface implementation