added license headers, revisited class visibility, enhanced imports