working now, minor cleanup.