comments and logging
more integrated class hierarchy, improved initialization