Finishing touches. Removes some no longer used code.