Further cleanup, adding features.