fixed final text errors, removed some boilerplate