fixed compiler errors, much work remains...